import taroFetch, { request as taroRequest } from "./taro-request";
import axiosFetch, { request as axiosRequest } from "./axios-request";

const fetchHandler = process.env.TARO_ENV === "h5" ? axiosFetch : taroFetch;

export const request =
  process.env.TARO_ENV === "h5" ? axiosRequest : taroRequest;

export default fetchHandler;
